import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CanAuthProvide } from '@core/guard/can-auth.provide';
import { AllControlComponent } from './all-control/all-control.component';
import { CarControlComponent } from './car-control/car-control.component';
import { ControlIndexComponent } from './control-index/control-index.component';
import { CustomServiceControlComponent } from './custom-service-control/custom-service-control.component';
import { DomeControlComponent } from './dome-control/dome-control.component';
import { DoorControlComponent } from './door-control/door-control.component';
import { LeaderboardComponent } from "./phone-page/leaderboard/leaderboard.component";
import { PhonePageComponent } from './phone-page/phone-page.component';
import { PurchaseControlComponent } from './purchase-control/purchase-control.component';
import { TotalControlComponent } from './total-control/total-control.component';
const routes: Routes = [
  // 总控分析
  { path: 'totalControl', component: TotalControlComponent, canActivate: [CanAuthProvide]},
  { path: 'doorControl', component: DoorControlComponent, canActivate: [CanAuthProvide] },
  { path: 'customServiceControl', component: CustomServiceControlComponent, canActivate: [CanAuthProvide] },
  { path: 'purchaseControl', component: PurchaseControlComponent, canActivate: [CanAuthProvide] },
  { path: 'carControl', component: CarControlComponent, canActivate: [CanAuthProvide] },
  { path: 'allControl', component: AllControlComponent, canActivate: [CanAuthProvide] },
  { path: 'phonePage', component: PhonePageComponent },
  { path: 'phonePage/leaderboard', component: LeaderboardComponent },
  {path: 'control/index', component: ControlIndexComponent, canActivate: [CanAuthProvide] },
  {path: 'domeControl', component: DomeControlComponent, canActivate: [CanAuthProvide] }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class AnalysisRoutingModule { }
